package com.paradogs.framework.server;

import io.netty.channel.Channel;
import lombok.Getter;
import org.springframework.context.ApplicationEvent;


/**
 * @author: yumi
 * @date: 2024/10/8  10:12
 * @Description: TODO
 */
public class ServerEvent {
    // 客户端建立
    public static class ClientEnterEvent extends ApplicationEvent {
        public ClientEnterEvent(Channel source) {
            super(source);
        }
    }
    // 客户端离开
    @Getter
    public static class ClientLeaveEvent extends ApplicationEvent {
        private Channel channel;
        public ClientLeaveEvent(Object source, Channel channel) {
            super(source);
            this.channel = channel;
        }
    }
    // 消息处理完成
    public static class OneMessageHandleAfterEvent extends ApplicationEvent {
        public OneMessageHandleAfterEvent(ParadogsContext ctx) {
            super(ctx);
        }
    }
    // 服务器帧事件
    public static class ServerUpdateEvent extends ApplicationEvent {
        public ServerUpdateEvent(Object source) {
            super(source);
        }
    }
    // 服务器启动完成
    public static class ServerStartEvent extends ApplicationEvent {
        public ServerStartEvent(Object source) {
            super(source);
        }
    }
}
